﻿@{
    Layout = null; //Ignora MasterPage (_Layout.cshtml)
}

<!DOCTYPE html>

<html>
<head>
	<title>Mozaic</title>

	<link href="@Url.Content("~/Content/Reset.css")" rel="stylesheet" type="text/css" />
	<link href="@Url.Content("~/Content/jqueryLayout/jqueryLayout.css")" rel="stylesheet" type="text/css" />
	<link href="@Url.Content("~/Content/dhtmlxTabbar/dhtmlxtabbar.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/yuiMenu/yuiMenu.css")" rel="stylesheet" type="text/css" />
	<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />


	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script>
	<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js" type="text/javascript"></script>
	<script src="@Url.Content("~/Content/jqueryLayout/jquery.layout-latest.min.js")" type="text/javascript"></script>	
	<script src="@Url.Content("~/Content/dhtmlxTabbar/dhtmlxcommon.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Content/dhtmlxTabbar/dhtmlxtabbar.js")" type="text/javascript"></script>	
	<script type="text/javascript" src="http://yui.yahooapis.com/combo?2.9.0/build/yahoo-dom-event/yahoo-dom-event.js&2.9.0/build/container/container_core-min.js&2.9.0/build/menu/menu-min.js" ></script>	

	<script type="text/javascript">
		/// <reference path="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.5-vsdoc.js"/> //adauga intellisence.pt. jQuery
	</script>

	<script type="text/javascript">

		function callNewTab(numeTab, link) { //at. cand apelez o pagina din alta pagina
			if (numeTab.length > 14) numeTab = numeTab.substring(0, 14) + '...'; //trunchiaza titlul la 14ch
			var newTabId = (new Date()).valueOf();
			parent.tabbar.addTab(newTabId, numeTab,'*'); //width=auto
			parent.tabbar.setContentHref(newTabId, link);
			parent.tabbar.setTabActive(newTabId);
			//parent.tabbar.forceLoad(newTabId); //Dadi
        }


        function callNewTab2(p_sType, p_aArgs, p_oValue) { //at. cand apelez o pagina din meniul ppal
            callNewTab(this.cfg.getProperty('text').substring(this.cfg.getProperty('text').indexOf("</span>") + 7), p_oValue[0]); //Primul parametru este textul de dupa </span>
        }


		$(document).ready(function () {

		    //Genereaza jQueryLayout
		    myLayout = $('#container').layout({
		        onresize: function () {
		            //ajusteaza continutul din tab la resize (fereastra sau bara)
		            tabbar.setSize(myLayout.state.center.innerWidth + 0, myLayout.state.center.innerHeight, true);
		        }
		    });


		    //Genereaza yuiMenu
		    var oMenu = new YAHOO.widget.Menu("basicmenu", { position: "static" });
		    oMenu.addItems([

							{ text: "<span class='icon one-icon2 ui-icon ui-icon-clock'></span>Mercurial", onclick: { fn: callNewTab2, obj: ["http://mercurial.selenic.com/"]} },
							{ text: "<span class='icon one-icon2 ui-icon ui-icon-comment'></span>Turtoise Hg", onclick: { fn: callNewTab2, obj: ["http://tortoisehg.bitbucket.org/"]} },
							{ text: "<span class='icon one-icon2 ui-icon ui-icon-disk'></span>Codeplex - HomePag.", onclick: { fn: callNewTab2, obj: ["http://www.codeplex.com/"]} },
							{ text: "<span class='icon one-icon2 ui-icon ui-icon-folder-open'></span>Balsamiq...", onclick: { fn: callNewTab2, obj: ["http://balsamiq.com/products/mockups"]} }
						]);
		    oMenu.render("rendertarget");
		    oMenu.show();


            //Genereaza dhtmlxTabbar
		    tabbar = new dhtmlXTabBar("a_tabbar", "top");
		    tabbar.setSkin('dhx_skyblue');
		    tabbar.setSkinColors("#2b2b2b", "#f4f4f4");
		    tabbar.setImagePath("../../Content/dhtmlxTabbar/imgs/");
		    tabbar.enableTabCloseButton(true);
		    tabbar.preventIECashing(true);
		    tabbar.loadXML("../../Content/dhtmlxTabbar/tabs.xml");
		    tabbar.setMargin(2); //distanta dintre tab-uri
		    tabbar.setOffset(0); //offset pt. primul tab

		})

	</script>


</head>
<body >
    <div id="dSigla">
    <a id="aSigla" href="" >
        <span id="sSigla">
            Mozaic
        </span>
    </a>
    </div>

    <div id="container" >

	    <div class="pane ui-layout-west">
		    <div id="rendertarget" class="yui-skin-sam" ></div>
	    </div>

	    <div class="pane ui-layout-center" >
		    <div class="ui-layout-content">
			    <div id="a_tabbar"></div>
			</div>
	    </div>

    </div>
</body>
</html>
